﻿using DocumentFormat.OpenXml.Lite.DrawingML.Base;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Locks
{
    [XmlRoot("spLocks", Namespace = Constants.Main)]
    public class ShapeLocks : XmlSerializable
    {
        [Optional]
        [XmlAttribute("noGrp", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowGrouping { get; set; }

        [Optional]
        [XmlAttribute("noSelect", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowSelection { get; set; }

        [Optional]
        [XmlAttribute("noRot", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowRotation { get; set; }

        [Optional]
        [XmlAttribute("noChangeAspect", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowAspectRatioChange { get; set; }

        [Optional]
        [XmlAttribute("noMove", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowMovement { get; set; }

        [Optional]
        [XmlAttribute("noResize", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowResize { get; set; }

        [Optional]
        [XmlAttribute("noEditPoints", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowPointEditing { get; set; }

        [Optional]
        [XmlAttribute("noAdjustHandles", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowAdjustHandles { get; set; }

        [Optional]
        [XmlAttribute("noChangeArrowheads", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowArrowheadChanges { get; set; }

        [Optional]
        [XmlAttribute("noChangeShapeType", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowTypeChanges { get; set; }

        [Optional]
        [XmlAttribute("noTextEdit", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> DisallowTextEditing { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Main)]
        public ExtensionList DisallowExtensionList { get; set; }

        public ShapeLocks() { }
    }
}
